package com.hucais.agg.controller

import com.hucais.agg.service.CopyrightsTopNService
import com.hucais.core.utils.{DefaultPropertiesUtil, SparkDefaultUtil}
import org.apache.spark.SparkConf
import org.apache.spark.sql.SparkSession

/**
 * 业务员获取版权数排名
 */
object CopyrightsTopNController {
  def main(args: Array[String]): Unit = {
    // 获取SparkSession
    val sparkSession = SparkDefaultUtil.getSession(isLocal = false, this.getClass.getSimpleName, withEs = true, withHive = false)

    val ssc = sparkSession.sparkContext
    ssc.hadoopConfiguration.set("fs.defaultFS", DefaultPropertiesUtil.get("fs.defaultFS"))
    CopyrightsTopNService.action(ssc, sparkSession)
  }
}
